home *** CD-ROM | disk | FTP | other *** search
/ Radio Press Kit / Radio Press Kit.iso / pc / main.dxr / Internal_54_saved1FrameCode.ls < prev    next >
Encoding:
Text File  |  2003-10-02  |  4.5 KB  |  124 lines

  1. property pLeftArrowSprite, pPageSprite, pRightArrowSprite
  2. global gMaster, gSound
  3.  
  4. on prepareFrame me
  5.   hideFlashDialog()
  6.   hideQuitDialog()
  7. end
  8.  
  9. on enterFrame me
  10.   gMaster.pmarker = the frameLabel
  11.   sendAllSprites(#mSetUpGraphics)
  12. end
  13.  
  14. on exitFrame me
  15.   cursor(-1)
  16.   gSound.mResumeSound()
  17.   pLeftArrowSprite = 22
  18.   pPageSprite = 23
  19.   pRightArrowSprite = 24
  20.   gMaster.pmarker = the frameLabel
  21.   gMaster.pSavedCount = value(gMaster.pmarker.char[5])
  22.   if gMaster.pSummaryList[gMaster.pSummaryList.count].pPage > 1 then
  23.     sprite(pLeftArrowSprite).visible = 1
  24.     sprite(pPageSprite).visible = 1
  25.     sprite(pRightArrowSprite).visible = 1
  26.     if gMaster.pSavedCount = 0 then
  27.       gMaster.pSavedCount = 1
  28.     end if
  29.     vSavedCount = gMaster.pSummaryList[gMaster.pSummaryList.count].pPage
  30.     vText = "Page " & gMaster.pSavedCount & " of " & vSavedCount
  31.     member("Page", "assets").text = vText
  32.   else
  33.     sprite(pLeftArrowSprite).visible = 0
  34.     sprite(pPageSprite).visible = 0
  35.     sprite(pRightArrowSprite).visible = 0
  36.   end if
  37.   gMaster.pSavedSummaryList = []
  38.   repeat with x = 1 to gMaster.pSummaryList.count
  39.     if gMaster.pSummaryList[x].pPage = gMaster.pSavedCount then
  40.       add(gMaster.pSavedSummaryList, gMaster.pSummaryList[x])
  41.     end if
  42.   end repeat
  43.   if gMaster.pSummaryList.count = 0 then
  44.     alert("the gMaster.pSummaryList list is empty")
  45.     exit
  46.   else
  47.     if gMaster.pSavedSettings.xyeffect = "TRUE" then
  48.       vSpriteCount = gMaster.pPhotoSpriteStartNum
  49.       repeat with x = 1 to gMaster.pSummaryList.count
  50.         sprite(vSpriteCount).member = member(gMaster.pSummaryList[x].pSmallName, gMaster.pSummaryList[x].pCastLib)
  51.         sprite(vSpriteCount).loc = gMaster.pSummaryList[x].pXYPosition
  52.         vMemberWidth = member(gMaster.pSummaryList[x].pSmallName, gMaster.pSummaryList[x].pCastLib).width
  53.         vMemberHeight = member(gMaster.pSummaryList[x].pSmallName, gMaster.pSummaryList[x].pCastLib).height
  54.         vWidth = vMemberWidth * float("." & gMaster.pSavedSettings.percentage)
  55.         vHeight = vMemberHeight * float("." & gMaster.pSavedSettings.percentage)
  56.         if gMaster.pSavedSettings.percentage = 100 then
  57.           sprite(vSpriteCount).width = vMemberWidth
  58.           sprite(vSpriteCount).height = vMemberHeight
  59.         else
  60.           sprite(vSpriteCount).width = vWidth
  61.           sprite(vSpriteCount).height = vHeight
  62.         end if
  63.         vSpriteCount = vSpriteCount + 1
  64.       end repeat
  65.       updateStage()
  66.     end if
  67.     if gMaster.pSavedSettings.blendeffect = "TRUE" then
  68.       vSpriteCount = gMaster.pPhotoSpriteStartNum
  69.       repeat with x = 1 to gMaster.pSummaryList.count
  70.         if gMaster.pSummaryList[x].pSelected = "no" then
  71.           sprite(vSpriteCount).blend = 100
  72.         else
  73.           sprite(vSpriteCount).blend = gMaster.pSavedSettings.blendpercent
  74.         end if
  75.         vSpriteCount = vSpriteCount + 1
  76.       end repeat
  77.     end if
  78.     if gMaster.pSavedSettings.rectangles = "TRUE" then
  79.       vSpriteCount = gMaster.pPhotoSpriteStartNum
  80.       vSpriteCount2 = gMaster.pRectangleSpriteStartNum
  81.       repeat with x = 1 to gMaster.pSummaryList.count
  82.         if gMaster.pSummaryList[x].pSelected = "no" then
  83.           sprite(vSpriteCount2).rect = rect(-2000, -2000, -1999, 1999)
  84.         else
  85.           vLeft = sprite(vSpriteCount).left - 2
  86.           vTop = sprite(vSpriteCount).top - 2
  87.           vRight = sprite(vSpriteCount).right + 2
  88.           vBottom = sprite(vSpriteCount).bottom + 2
  89.           sprite(vSpriteCount2).rect = rect(vLeft, vTop, vRight, vBottom)
  90.         end if
  91.         vSpriteCount = vSpriteCount + 1
  92.         vSpriteCount2 = vSpriteCount2 + 1
  93.       end repeat
  94.     end if
  95.     if gMaster.pSavedSettings.pushpin = "TRUE" then
  96.       vSpriteCount = gMaster.pPhotoSpriteStartNum
  97.       vSpriteCount2 = gMaster.pPushPinSpriteStartNum
  98.       repeat with x = 1 to gMaster.pSummaryList.count
  99.         if gMaster.pSummaryList[x].pSelected = "no" then
  100.           sprite(vSpriteCount2).loc = point(-2000, -2000)
  101.         else
  102.           vLeft = sprite(vSpriteCount).left + gMaster.pSavedSettings.pinoffset[1]
  103.           vTop = sprite(vSpriteCount).top + gMaster.pSavedSettings.pinoffset[2]
  104.           sprite(vSpriteCount2).loc = point(vLeft, vTop)
  105.         end if
  106.         vSpriteCount = vSpriteCount + 1
  107.         vSpriteCount2 = vSpriteCount2 + 1
  108.       end repeat
  109.     end if
  110.     vOK = "no"
  111.     repeat with y = 1 to gMaster.pSummaryList.count
  112.       if gMaster.pSummaryList[y].pSelected = "yes" then
  113.         vOK = "yes"
  114.         exit repeat
  115.       end if
  116.     end repeat
  117.     if vOK = "yes" then
  118.       sendSprite(9, #mSetOnStage)
  119.     else
  120.       sendSprite(9, #mSetOffStage)
  121.     end if
  122.   end if
  123. end
  124.